<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>2335：[SCOI2011]飞镖</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[SCOI2011]飞镖</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[SCOI2011]飞镖</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                [SCOI2011]飞镖                </h1>
                <p>时间限制：10s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：128MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><div class="Section0" style="layout-grid:  15.6pt none"><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p>
<div class="Section0" style="layout-grid:  15.6pt none">
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'">飞镖是在欧洲颇为流行的一项运动。它的镖盘上分为<font face="Times New Roman">20</font><font face="宋体">个扇形区域，分别标有</font><font face="Times New Roman">1</font><font face="宋体">到</font><font face="Times New Roman">20</font><font face="宋体">的分值，每个区域中有单倍、双倍和三倍的区域，打中对应的区域会得到分值乘以倍数所对应的分数。例如打中</font><font face="Times New Roman">18</font><font face="宋体">分里面的三倍区域，就会得到</font><font face="Times New Roman">54</font><font face="宋体">分。另外，在镖盘的中央，还有</font><font face="Times New Roman">&ldquo;</font><font face="宋体">小红心</font><font face="Times New Roman">&rdquo;</font><font face="宋体">和</font><font face="Times New Roman">&ldquo;</font><font face="宋体">大红心</font><font face="Times New Roman">&rdquo;</font><font face="宋体">，分别是</font><font face="Times New Roman">25</font><font face="宋体">分和</font><font face="Times New Roman">50</font><font face="宋体">分。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'">通常的飞镖规则还有一条，那就是在最后一镖的时候，必须以双倍结束战斗，才算获胜。也就是说，当还剩<font face="Times New Roman">12</font><font face="宋体">分的时候，必须打中双倍的</font><font face="Times New Roman">6</font><font face="宋体">才算赢，而打中单倍的</font><font face="Times New Roman">12</font><font face="宋体">或者三倍的</font><font face="Times New Roman">4</font><font face="宋体">则不算。特别的，</font><font face="Times New Roman">&ldquo;</font><font face="宋体">大红心</font><font face="Times New Roman">&rdquo;</font><font face="宋体">也算双倍</font><font face="Times New Roman">(</font><font face="宋体">双倍的</font><font face="Times New Roman">25)</font><font face="宋体">。在这样的规则下，</font><font face="Times New Roman">3</font><font face="宋体">镖能解决的最多分数是</font><font face="Times New Roman">170</font><font face="宋体">分</font><font face="Times New Roman">(</font><font face="宋体">两个三倍的</font><font face="Times New Roman">20</font><font face="宋体">，最后用大红心结束</font><font face="Times New Roman">)</font><font face="宋体">。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'">现在，<font face="Times New Roman">lxhgww</font><font face="宋体">把原来的</font><font face="Times New Roman">1</font><font face="宋体">到</font><font face="Times New Roman">20</font><font face="宋体">分的分值变为了</font><font face="Times New Roman">1</font><font face="宋体">到</font><font face="Times New Roman">K</font><font face="宋体">分，同时把小红心的分数变为了</font><font face="Times New Roman">M</font><font face="宋体">分</font><font face="Times New Roman">(</font><font face="宋体">大红心是其双倍</font><font face="Times New Roman">)</font><font face="宋体">，现在</font><font face="Times New Roman">lxhgww</font><font face="宋体">想知道能否在</font><font face="Times New Roman">3</font><font face="宋体">镖内（可以不一定用满</font><font face="Times New Roman">3</font><font face="宋体">镖）解决</font><font face="Times New Roman">X</font><font face="宋体">分。同样的，最后一镖必须是双倍（包括大红心）。</font></span><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
</div>
</o:p></span></div>
<!--EndFragment--></p><hr/><h3>输入格式</h3><p><p><img alt="" src="../file/2335_0.jpg" /></p></p><hr/><h3>输出格式</h3><p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt"><span style="font-size: 10.5pt; font-family: 'Times New Roman'; mso-spacerun: 'yes'">一行，包括一个数字，表示这<font face="Times New Roman">T</font><font face="宋体">组数据中，能够被解决的数据数目。</font></span></p>
<!--EndFragment--></p><hr/><h3>样例输入</h3><pre>	5
	1 2 2 10 20
	1 3 2 15 25
	2 2 5 200 170
</pre><hr/><h3>样例输出</h3><pre>	4
</pre><hr/><h3>提示</h3><p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: '宋体'; mso-spacerun: 'yes'">1&lt;=T&lt;=1000000,20&lt;=K1,M1,X1,D1,D2,D3&lt;=10^9</span></p>
<p><!--EndFragment-->
<p></p>
</p>
<div class="Section0" style="layout-grid:  15.6pt none">
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; text-indent: 21pt"><span style="font-size: 10.5pt; font-family: '宋体'; mso-spacerun: 'yes'">0&lt;=A1,B1,C1,A2,B2,C2,A3,B3,c3&lt;=10^9</span><span style="font-size: 10.5pt; font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
</div>
<!--EndFragment--></p><hr/><h3>题目来源</h3><p>Day2</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=2335" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=2335" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>